﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucCartUser.ascx.cs"
    Inherits="QuocTeViet.AdminCP.PageUC.ucCartUser" %>
    <h2>Thông tin đơn hàng</h2>
<div style="margin-left: 10px; margin-right: 10px">
    <asp:GridView ID="GrDonhang" runat="server" Width="100%" BackColor="White" BorderStyle="None"
        CellPadding="3" AllowPaging="True" DataKeyNames="DonHangID" Font-Names="Times New Roman"
        Font-Size="Medium" AutoGenerateColumns="False" EnableViewState="False" HorizontalAlign="Center"
        PageSize="20" BorderColor="#CCCCCC" BorderWidth="1px" 
        OnPageIndexChanging="GrDonhang_PageIndexChanging" 
        onselectedindexchanging="GrDonhang_SelectedIndexChanging">
        <RowStyle BorderColor="#2d2d2d" ForeColor="#000066" />
       <Columns>
        <asp:TemplateField HeaderText="Khách hàng">
            <ItemTemplate>
                <asp:Label ID="lblKhachHang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("ClientName") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Điện thoại">
            <ItemTemplate>
                <asp:Label ID="lblemail" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("Phone") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>        
        <asp:TemplateField HeaderText="Địa chỉ giao hàng">
            <ItemTemplate>
                <asp:Label ID="lblngaydathang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("Address") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tổng tiền">
            <ItemTemplate>
                <asp:Label ID="lblngaygiaohang" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Bind("TongTien","{0:##,##0 VNĐ}") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ghi chú">
            <ItemTemplate>
                <asp:Label ID="lblngaygiaohang1" runat="server" Style="margin-left: 2px;" 
                    Text='<%# Eval("GhiChu") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemStyle HorizontalAlign="Center" />
            <HeaderTemplate>
                <asp:Label ID="lbl10" runat="server" Text="Xử lý" />
            </HeaderTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="lbtnXuLy" runat="server" 
                    CommandArgument='<%#Eval("DonHangID") %>' ForeColor="#f6a70e"
                    Text='<%#(bool)Eval("XuLy")?"Đã xử lý":"Chưa xử lý"%>'  OnCommand="XuLy_LinkButton_Click"
                    ToolTip="Nhấn vào đây để thay đổi tình trạng"></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>      
        <asp:TemplateField HeaderText="Chi tiết">
                <ItemTemplate>
                    <asp:HyperLink ForeColor="#003366" Style="text-decoration: underline" runat="server"
                        ID="makhkh" NavigateUrl='<%#Eval("SessionID", "~/AdminCP/Default.aspx?Page=CartDetail&sID={0}") %>'
                        Text="Chi tiết"></asp:HyperLink>
                </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Xóa bản ghi">
        <ItemTemplate>
         <asp:ImageButton ID="imgbtnDelete" runat="server" CommandArgument='<%#Eval("DonHangID") %>' OnCommand="imgbtnDelete_Click"
                        ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
        </ItemTemplate>
        </asp:TemplateField>
        
    </Columns>
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#C75755" Height="25px" Font-Bold="True" ForeColor="White" />
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <PagerStyle HorizontalAlign="Left" BackColor="White" ForeColor="#000066" />
        <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
    </asp:GridView>
</div>
